package com.yboot.module.system.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yboot.starter.common.core.web.validation.InsertGroup;
import com.yboot.starter.common.core.web.validation.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 文件表
 * @author yangcs
 * @date 2025-08-29
 */
@Data
public class SysFileDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @NotBlank(message = "id不能为空", groups = {UpdateGroup.class})
    private String id;
    /**
     * 名称
     */
    @NotBlank(message = "name不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String name;
    /**
     * 原始名称
     */
    @NotBlank(message = "originalName不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String originalName;
    /**
     * 大小（字节）
     */
    private Long fileSize;
    /**
     * 上级目录
     */
    @NotBlank(message = "parentPath不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String parentPath;
    /**
     * 路径
     */
    @NotBlank(message = "path不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String path;
    /**
     * 扩展名
     */
    private String extension;
    /**
     * 内容类型
     */
    private String contentType;
    /**
     * 类型（0: 目录；1：其他；2：图片；3：文档；4：视频；5：音频）
     */
    @NotBlank(message = "type不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String type;
    /**
     * SHA256值
     */
    private String sha256;
    /**
     * 元数据
     */
    private String metadata;
    /**
     * 缩略图名称
     */
    private String thumbnailName;
    /**
     * 缩略图大小（字节)
     */
    private Long thumbnailSize;
    /**
     * 缩略图元数据
     */
    private String thumbnailMetadata;
    /**
     * 存储ID
     */
    @NotBlank(message = "storageId不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String storageId;
    /**
     * 删除标识
     */
    private String deleteFlag;
}
